﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using SUT = Admx_Generator;

namespace Tests_Admx_Generator
{
    class Test_Revision
    {
        [TestClass]
        public class Constructor_Should
        {
            [TestMethod]
            public void ProperlyInitializeMajorAndMinorProperties_WhenCalledWithNumbers()
            {
                // Arrange
                SUT.Revision revision = new SUT.Revision(1, 0);
                SUT.Revision revision2 = new SUT.Revision(3, 7);

                // Assert
                Assert.AreEqual(revision.Major, 1u);
                Assert.AreEqual(revision.Minor, 0u);
                Assert.AreEqual(revision2.Major, 3u);
                Assert.AreEqual(revision2.Minor, 7u);
            }

            [TestMethod]
            public void ProperlyInitializeMajorAndMinorProperties_WhenCalledWithAString()
            {
                // Arrange
                SUT.Revision revision = new SUT.Revision("1, 0");
                SUT.Revision revision2 = new SUT.Revision("3, 7");

                // Assert
                Assert.AreEqual(revision.Major, 1u);
                Assert.AreEqual(revision.Minor, 0u);
                Assert.AreEqual(revision2.Major, 3u);
                Assert.AreEqual(revision2.Minor, 7u);
            }
        }
    }
}
